package ru.papergames.battleserver.network.serverpackets.webserver;

import ru.papergames.battleserver.model.PaperGameFlashUser;

/**
 * @author: atroshanin
 * Date: 19.09.2010
 * Time: 17:38:46
 */
public class FlashUserDisconnected extends WebServerServerPacket {

    private long playerId;

    public FlashUserDisconnected(PaperGameFlashUser usr) {
        this.playerId = usr.getId();
    }

    @Override
    protected void writePacketId() {
        writeC(FLASH_USER_DISCONNECTED_PACKET_ID);
    }

    @Override
    protected void writePacketData() {
        System.out.println("FlashUserDisconnected.writePacketData[" + playerId + "]");
        writeQ(playerId);
    }

    @Override
    public String getType() {
        return "[s] FlashUserDisconnected[" + FLASH_USER_DISCONNECTED_PACKET_ID + "]";
    }
}
